﻿namespace Tests
{
    using NUnit.Framework;
    using PNUnit.Framework;
    using System.Threading;

    [TestFixture]
    public class TestClass1
    {
        [SetUp]
        public void SetUp()
        {
            PNUnitServices.Get().InitBarriers();
            PNUnitServices.Get().WriteLine("We're ready!");
            PNUnitServices.Get().EnterBarrier("READY");
        }

        [Test]
        public void Test_A()
        {
            PNUnitServices.Get().WriteLine("I've finish!");
            PNUnitServices.Get().EnterBarrier("DONE");
        }

        [Test]
        public void Test_B()
        {
            Thread.Sleep(5000);
            PNUnitServices.Get().WriteLine("I've finish!");
            PNUnitServices.Get().EnterBarrier("DONE");
        }

        [TearDown]
        public void TearDown()
        {
            PNUnitServices.Get().WriteLine("We're finished!");
            PNUnitServices.Get().EnterBarrier("FINISH");
        }
    }
}
